package polarity;

import java.util.TreeMap;
import java.util.Map.Entry;

public class Polarity 
{
	private TreeMap<String, Double> bayesBinomial = new TreeMap<String, Double>();
        /**
         * Retourne le resultat du calcul binomial
         * @return 
         */
	public TreeMap<String, Double> getBayesBinomial() { return bayesBinomial; }
	
	private TreeMap<String, Double> bayesMultinomial = new TreeMap<String, Double>();
        /**
         * Retourne le resultat du calcul multinomial
         * @return 
         */
	public TreeMap<String, Double> getBayesMultinomial() { return bayesMultinomial; }
	
	private TreeMap<String, Double> vector = new TreeMap<String, Double>();
        /**
         * Retourne le vecteur
         * @return 
         */
	public TreeMap<String, Double> getVector() { return vector; }
	
	private int numberOfTweet = 0;
	
        /**
         * Renvoie le nombre de tweets
         * @return 
         */
	public int getNumberOfTweet() { return numberOfTweet; }
        /**
         * augmente le nombre de tweets de 1
         */
	public void incNumberOfTweet() { numberOfTweet++; }
	
	private TreeMap<String, Integer> vocabulary = new TreeMap<String, Integer>(); // Mots Occurence
	
        /**
         * retourne le vocabulaire
         * @return 
         */
	public TreeMap<String, Integer> getVocabulary() { return vocabulary; } 
	
        /**
         * Retourne le nombre de mots uniques
         * @return 
         */
	public int getNumberOfWords()
	{
		int number = 0;
		for(Entry<String, Integer> set : vocabulary.entrySet() )
		{
			number += set.getValue();
		}
		return number;
	}
	
}
